package com.sz.biz.common.project.dto;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: Johnboy <br>
 * Date: 2017-08-01 09:24:00
 */
public enum ProjectStatusEnum {
    DRAFTSTATUS(1, "草稿"),
    WAITFIRSTTRIALSTATUS(2, "待初审"),
    WAITFINALTRIALSTATUS(3, "待终审"),
    APPROVEDSTATUS(4, "已立项"),
    COMPLETEDSTATUS(5, "已结项"),
    CLOSEDPSTATUS(6, "已关闭");


    private int code;
    private String name;

    public ProjectStatusEnum value(int code) {
        for (ProjectStatusEnum projectStatusEnum : ProjectStatusEnum.values()) {
            if (projectStatusEnum.getCode() == code) {
                return projectStatusEnum;
            }
        }
        return null;
    }

    ProjectStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
